@model ShivamEMR.Model.Domain.PharmacyDomain.DrugGeneric

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Name)
    @Html.ValidationMessageFor(model => model.Name)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Administration)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Administration)
    @Html.ValidationMessageFor(model => model.Administration)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.SpecialPrecautions)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.SpecialPrecautions)
    @Html.ValidationMessageFor(model => model.SpecialPrecautions)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.AdverseDrugReactions)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.AdverseDrugReactions)
    @Html.ValidationMessageFor(model => model.AdverseDrugReactions)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Description)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Description)
    @Html.ValidationMessageFor(model => model.Description)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    DrugCategory
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.DrugCategoryID, ((IEnumerable<ShivamEMR.Model.Domain.PharmacyDomain.DrugCategory>)ViewBag.PossibleDrugCategories).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.DrugCategoryID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.DrugCategoryID)
</div>
<div class="editor-label">
    DrugClass
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.DrugClassID, ((IEnumerable<ShivamEMR.Model.Domain.PharmacyDomain.DrugClass>)ViewBag.PossibleDrugClasses).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.DrugClassID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.DrugClassID)
</div>
<div class="editor-label">
    Group
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.GroupID, ((IEnumerable<ShivamEMR.Model.Domain.PharmacyDomain.DrugGroup>)ViewBag.PossibleGroups).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.GroupID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.GroupID)
</div>
